package com.my.test.java.autocode.util;

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.my.test.java.autocode.entiy.ClassPro;
import com.my.test.java.autocode.entiy.InterfacePro;
import com.my.test.java.autocode.entiy.Methods;
import com.my.test.java.autocode.entiy.Proporty;
import com.my.test.java.autocode.util.ACStringUtils;

public class FileUtils {

	public static void writeFile(String fileName,String context){
		try{
			  File file =new File(fileName);
			  if(file.exists()){
				  file.delete();
			  }
		      if(!file.exists()){
		       file.createNewFile();
		      }
		      FileWriter fileWritter = new FileWriter(file,true);
	          BufferedWriter bufferWritter = new BufferedWriter(fileWritter);
	          bufferWritter.write(context);
	          bufferWritter.close();
	          System.out.println("Done");
	     }catch(IOException e){
	    	  e.printStackTrace();
	     }
	}
}
